package com.basin.common.feign.properties;

import com.basin.common.core.factory.YmlPropertySourceFactory;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: Sam ZHONG | sammy1997@aliyun.com
 * @date: 2025/5/1 10:35
 * @description:
 */
@Setter
@Getter
@Component
@EnableConfigurationProperties
@ConfigurationProperties(prefix = "basin")
@PropertySource(value = "classpath:basin-common-feign.yml", factory = YmlPropertySourceFactory.class)
public class BasinBasicProp {
    private Map<String, Account> basic = new HashMap<>();

    @Data
    public static class Account {
        private String username;
        private String password;
    }
}
